package com.czl.dxpro.dx_08_taskEight;
import java.io.IOException;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

public class DxEightMain {

	public static void main(String[] args) throws IllegalArgumentException, IOException, ClassNotFoundException, IllegalStateException, InterruptedException {
		// TODO Auto-generated method stub	
			Job job2=Job.getInstance();			
			job2.setJarByClass(DxEightMain.class);
			job2.setMapperClass(EightMapper.class);
			job2.setReducerClass(EightReduce.class);
			job2.setMapOutputKeyClass(Text.class);
			job2.setMapOutputValueClass(Text.class);
			job2.setOutputKeyClass(NullWritable.class);
			job2.setOutputValueClass(Text.class);
			FileInputFormat.addInputPath(job2,new Path("d://data/dx/DxSeven"));
			FileOutputFormat.setOutputPath(job2,new Path("d://data/dx/DxEight"));
			System.exit(job2.waitForCompletion(true)?0:1);
	}
}


